/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package worker;

import book.PhoneBookItem;

/**
 *
 * @author xDrake
 */
public class Worker_fake implements IPhoneWorker {

    @Override
    public PhoneBookItem[] getItems() {
       throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public PhoneBookItem getItem(String id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public Boolean addItem(PhoneBookItem item) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void deleteItem(String id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }



//    PhoneBook book = new PhoneBook();
//    //private String page = "";
//
//    public String getPage() {
//        if (this.book.getPage("A1") != null) {
//            return this.book.getPage("A1").toString();
//        }
//        return "no data";
//    }
//
//    public String getAll() {
//        StringBuilder str = new StringBuilder();
//
//        for (Object it : book.getPages().values()) {
//            str.append(it.toString());
//            str.append("<br />==================================<br />");
//        }
//        return str.toString();
//    }
//
//    public String getUsers() {
//        StringBuilder code = new StringBuilder();
//        try {
//            MySQL db = new MySQL("coderz_req", "coderz_req", "flatron");
//            db.Connect();
//            ResultSet rs = db.querySelect("SELECT * FROM tPhoneBook");
//
//            code.append("<table border = '1'");
//            while (rs.next()) {                           
//                code.append("<tr>");
//
//                code.append("<td>");
//                code.append(rs.getString("cID"));
//                code.append("</td>");
//                
//                code.append("<td>");
//                code.append(rs.getString("cPrivateID"));
//                code.append("</td>");                
//
//                code.append("<td>");
//                code.append(rs.getString("cLogin"));
//                code.append("</td>");
//
//                code.append("<td>");
//                code.append(rs.getString("cPass"));
//                code.append("</td>");
//                
//                code.append("<td>");
//                code.append(rs.getString("cPhone1"));
//                code.append("</td>");                 
//
//                code.append("</tr>");
//            }
//            code.append("</table");
//            db.Close();
//            
//        } catch (SQLException ex) {
//            return ex.toString();
//        }
//
//        return code.toString();
//    }
//
//    public Worker_fake() {
//
//        //String val = request
//        for (int i = 0; i < 10; i++) {
//            PhoneBookItem item = new PhoneBookItem();
//            item.setSurname("Surname_" + (String.valueOf(Math.random())));
//            item.setFirst_name("Firstname_" + (String.valueOf(Math.random())));
//            item.setSecond_name("Secondname_" + (String.valueOf(Math.random())));
//            item.setPhone1(String.valueOf(Math.random() * 1000000));
//            item.setPhone2(String.valueOf(Math.random() * 1000000));
//            item.setPhone3(String.valueOf(Math.random() * 1000000));
//            item.setPrivateID("user_" + (String.valueOf(Math.random() * 1000)));
//            item.setAddr("Someaddr_" + (String.valueOf(Math.random() * 1000)));
//            book.addPage(item);
//        }
//        
//        //addModel("time", new Date());
//    }

    @Override
    public void generateUsers(int count) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public Boolean editItem(PhoneBookItem item) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
